using MediatR;
using RBAC.Domain.Dto.Output;
using RBAC.ErrorCode;
using RBAC.Read.Api.Application.Dto.ERP;

namespace RBAC.Read.Api.Application.Command.ERP.SalesManagement
{
    /// <summary>
    /// 获取物料分页列表 命令
    /// </summary>
    public class GetMaterPageCommand : IRequest<APIPaging<MaterListDto>>
    {
        public int PageIndex { get; set; } = 1;
        public int PageSize { get; set; } = 10;

        /// <summary>物料编码 模糊</summary>
        public string? MaterCode { get; set; }
        /// <summary>物料名称 模糊</summary>
        public string? MaterName { get; set; }
        /// <summary>
        /// 物料分类ID（按分类筛选）
        /// </summary>
        public long? MaterTypeId { get; set; }
        /// <summary>
        /// 分类编码前缀（用于按分类筛选，若采用前缀编码规则）
        /// </summary>
        public string? TypeCodePrefix { get; set; }
        /// <summary>
        /// 排序，默认按 Id 倒序
        /// </summary>
        public string OrderBy { get; set; } = "Id DESC";
    }
}
